package ccm.common;

public class Crc
{
    static
    {
        NativeUtils.loadLibrary("libccm_common_Crc");
    }

    public static int crc16Modbus(byte[] buf,int i,int n)
    {
        return crc16Modbus(0XFFFF,buf,i,n);
    }

    public static int crc8OneWire(byte[] buf,int i,int n)
    {
        return crc8OneWire(0X00,buf,i,n);
    }

    native public static int crc16Modbus(int ans,byte[] buf,int i,int n);

    native public static int crc8OneWire(int ans,byte[] buf,int i,int n);
}
